from urllib.response import addbase


class Student:
    name = None
    age = 0
    address = None

    def __init__(self,name,age,address):
        self.name = name
        self.age = age
        self.address = address

#魔术方法
    def __str__(self):
        return f"学生姓名为:{stu_1.name},学生年龄为:{stu_1.age},学生地址为:{stu_1.address}"
#对象的比较  小于符号比较
    def __lt__(self, other):
        return self.age < other.age
#小于等于符号
    def __le__(self, other):
        return self.age <= other.age

#比较对象是否相同
    def __eq__(self, other):
        return self.age == other.age

# for x in range(10):
#     name = input("输入姓名:")
#     age = int(input("输入年龄:"))
#     address = input("输入地址:")
#     stu_1 = Student(name, age, address)
#     print(stu_1)
#

stu_1 = Student("liu",16,"asd")

stu_2 = Student("liu",16,"asd")
print(stu_1==stu_2)
